package com.example.jetpackdemo.basic_camera;


import android.hardware.Camera;

import androidx.core.util.Pair;

import java.util.List;

/**
 * @author: tuyrt7 on 2020/12/2.
 */
public class CameraConfig {

    private CameraPreview.CaptureMode mCaptureMode = CameraPreview.CaptureMode.IMAGE;


    public boolean isHasGpsData() {
        return hasGpsData;
    }

    public void setHasGpsData(boolean hasGpsData) {
        this.hasGpsData = hasGpsData;
    }

    private boolean hasGpsData = false;



    private Pair<Integer,Integer> videoSize = new Pair(640, 480);

    public CameraConfig() {
    }

    public CameraPreview.CaptureMode getCaptureMode() {
        return mCaptureMode;
    }

    public void setCaptureMode(CameraPreview.CaptureMode captureMode) {
        mCaptureMode = captureMode;
    }

    public void initCameraParams(Camera camera) {
        Camera.Parameters parameters = camera.getParameters();
        List<Camera.Size> supportedVideoSizes = parameters.getSupportedVideoSizes();
        getBestVideoSize(supportedVideoSizes);

    }

    private void getBestVideoSize(List<Camera.Size> supportedVideoSizes) {

    }

    public Pair<Integer, Integer> getVideoSize() {
        return videoSize;
    }


}
